#!/bin/sh
#
# Startup script for Main

export HOME=.
export INCLUDE=$HOME/cmd/service.in.sh
export JMXHOST=localhost
export JMXPORT=44446
export APPENV=development
export XMS=512M
pid_file=$HOME/tmp/service.pid
log_file=$HOME/tmp/service.log

case "$1" in
    start)
        # Main startup
        echo -n "Starting Penguin project: "

        $HOME/cmd/service -p $pid_file > $log_file 2>&1
        echo "OK"
        ;;
    stop)
        # Main shutdown
        echo -n "Shutdown Penguin project: "
        kill `cat $pid_file`
        echo "OK"
        ;;
    reload|restart)
        $0 stop
        $0 start
        ;;
    status)
        ;;
    *)
        echo "Usage: `basename $0` start|stop|restart|reload"
        exit 1
esac

exit 0

# vi:ai sw=4 ts=4 tw=0 et

